package cn.south.campus.common.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer;

/**
 * <p>
 *
 * </p>
 *
 * @author chow
 * @since 2023/4/10 19:12
 */
@Configuration
public class FreemarkerConfig {


    @Bean("freeMarkerConfigurer")
    public FreeMarkerConfigurer freeMarkerConfigurer(){
        FreeMarkerConfigurer configurer = new FreeMarkerConfigurer();
        configurer.setDefaultEncoding("UTF-8");
        configurer.setTemplateLoaderPath("classpath:/templates");
        return configurer;
    }
}
